fix crash (thanks baracoder!)