bugs fixed example