some RBM fixes