Fixed some bugs to run on live