Use TARGET_WIDTH/HEIGHT instead of hardcoding. Fix compiler warning.