validation bugs fixed