Fixed another boat fly bug. Some optimizations