Fix #327

This fixes the compilation under clang 3.4, but i have to admit the entire process of fixing it was best described by the "I have no idea what i'm doing dog" meme