Fixed issue with keys not working