fixing the floating image problem