Fix restApi and mysql fixes