Fixed the bug related to rails server crash