Fixing some stuff for API