Fix for release mode, remove unused variable