fixed end key issues, hopefully