Fix two files with common code issues