Fixed errors pointed out by spikebrehm.