Removed debug code that caused crashes