fixed 500 error. issue #2