solved a weird bug