Corrected some problems