fixed the original bug