Post your code. Just because you're only using 9k of program memory doesn't mean you can't be running out of RAM