fixed calculation bug with -1