Fixed bug in $inc operation