Little cleanup & bug fix