Fix negative level bug