bug fixes, more server side validation