Fix visibility function

* Fix visibility function. Now extracts the previous max and the current min correctly. 
* 0.0.4 => 0.0.5