Fixed the issue that caused internal server error