bug fixes.  I hate javascript