Fixed bug with ip compasion