bug fixes
Attempted bug fixes