fix spell autotarget crash, add spell range
fix calling remove attributes twice