Metaprogramming not working