fix submission.rb bugs