Bug fix for inner classes