fixed problems outlined in https://github.com/Spferical/rgtuner/pull/6#issuecomment-57885516