bug fix for stability