Fix bugs to get it working!