fixed some problems in the operations