trying to fix the mysterious bug