small changes because of ugly decompiled code