merging Justyn's fix
Finalizing merge with Justyn's stuff