fixed bug with zoom calculation