null serialize bug fixed + refactored
..
..