Fix issues with production compilation