More bug checking