Fixes for #549 and #539

This PR has the changes I previously submitted compared to trunk 
@jtsternberg 

https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/539

https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/549