added check to make sure hitting enter twice does not cause issues