Fixed buggy behavior.