Add a newline at end to avoid end-of-file errors in msvc
Add manual type deduction to workaround msvc