add Ask on Stack Overflow link
fix undefined var
fix line endings