Hopefully fixed the code