Fix top offset bug