In the end, I made a new retropie image and then made sure to properly configure the controller at startup. The other issue was related to faulty card reader.