Major Rem function fix