fixed small kwargs bug in init function