fixed panning, added bounds