Sramp 507

https://issues.jboss.org/browse/SRAMP-507
Whatever you prefer! I just improved the previous code, but obviously maybe it is needed more