fix a Sinatra level bug and add test for it