Simplified getc to fix problems

might work.