Yep, your right, vi is the reason for the troubles I was having. Changed to a hex editor, put everything in and now works perfectly.