added edit event for admin and fixes some glitches