Fixing some bugs with parameters testing, and adding support for sub-range 3d alignment