Fix crash in sinatra server.