Fix max-width plugin to work on all sizes and listen to resize