fix top-positioning bug