cleaned up a bit, fixed another bug