improve mode rendering. there is a secondbuffer bug.