Fixing some warnings
Allow for all-zero output