Color detection now works propperly, fixed sevral bugs which caused it not to