More debugging, possible bug fix