Hopefully fixed a stackoverflow