fixed smallType / mediumType bug