fixed some issues in controller and added custom_encoders for type:list