Proper calling of prevent default