bind layout listeners properly