Removed debug messages as it works properly now