fixed some weird bug