fix #279

Just a workaround to prevent crash