Fixed some problems with delete and getsingle