Trying to fix a bug, still need some work