Tom fix logic bugs. Update this to avoid conflicts