Fixes the empty output problem