fixes potential bug