Fixed and improved test