Improved shake detect