fixed bugs!