ATmega1284P: End to End using 1.0 IDE

Is it just me or is someone else facing problems while uploading sketches into ATmega1284p using maniacbugs optiboot bootloader?

For the last few days I have been experiencing the problem. The smaller sketches say Blinky codes and all get uploaded fine(with a probability of around 90% ie) it uploads properly 9 out of 10times ) But when the sketch size is larger(Sketch of a project I am working on. Mine around 16-17KB) my rate of uploading correctly drops drastically to around 10-20% :frowning: Most of the time it uploades wrongly with the following error... :frowning:

avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x64
avrdude: stk500_cmd(): programmer is out of sync

Tried burning bootloader again and still no improvement... (The board and schematics I use ATmega1284P: End to End using 1.0 IDE - #248 by system - Microcontrollers - Arduino Forum)
Has anyone else experienced it??