Amazon Fire TV remote button mapping wrong

I just sideloaded the latest build on an Amazon Fire TV Stick 4k. The bluetooth remote gets detected right away according to the pop-up in the lower right hand corner of the screen. However, the button mapping is wrong:

The back button on the remote is mapped as the primary selection button and vice versa.

Is there a way to remap the two functions? Since RetroArch already comes with a config file for the Fire TV remote, could somebody maybe update the config file?