Cleaning up errors in code found by Ruby Mine
fixed merge changes