TMP: fix some layout + userlist sql bug introduced during port