Fixed recusion problem