Hopefully fixed all the issues