bugs fixed

Currently working.