trying to fix weird gif effect