Bugfix: Local variable used before it was initialized