Fix relative layout bugs