Fixed submit bug