Fixed bug with RAM