fixed for rails deprecated warnings