Fixing 500 errorg