fix nullpointer exception on when setPadding