Fixing bugs on submit and view assignment