Fixed bug with getting difference