Attempt 1 at fixing bug #1, will fix tomorrow.