major bug fix attempt 5