Fixed bug with $where validation