Now the example works, need to solve the real problem - how to find bug!