Fixed $ram attribute reading and replaced it.