Fix bugs from variables