Fixing form for making it work with API