Added error returning