More attempted bug fixes