Added missing code for RBM