fixing ray's hacks
rays fault