Added error tests