fix if-statement for devise key