finally fixed that stupid bug