bug fix and validation added to admin page