fixing template syntax for linux, hope we can move to c++11 soon:)