I believe it has something to do with my Yoast plugin conflicting. After disabling Yoast I managed to get it to work.